From: Richard M. Stallman Date: Mon, 16 Aug 2004 22:52:29 +0000 (+0000) Subject: (move_if_not_intangible): Force POSITION to be between BEGV and ZV. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~21383 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=6008737c5bf9a2eac5ea5713f0feecad8f3fa7c7;p=emacs.git (move_if_not_intangible): Force POSITION to be between BEGV and ZV. --- diff --git a/src/intervals.c b/src/intervals.c index 33ef9a34177..a822dafefcf 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -2275,6 +2275,10 @@ move_if_not_intangible (position) pos = Fnext_char_property_change (pos, Qnil); } + else if (position < BEGV) + position = BEGV; + else if (position > ZV) + position = ZV; /* If the whole stretch between PT and POSITION isn't intangible, try moving to POSITION (which means we actually move farther